package com.yunxi.customer.service;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.web.ApiResult;
import com.yunxi.core.web.LoginInfo;
import com.yunxi.customer.pojo.CustomerVO;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * <p>
 * 客户信息 服务类
 * </p>
 *
 * @author
 * @since 2019-05-09
 */
public interface CustomerDubboService {

   CustomerVO getById(String id) throws InvocationTargetException, IllegalAccessException, Exception;

   ApiResult getCustomerByPhone(String phone, LoginInfo loginInfo) throws Exception;

   ApiResult saveOrUpdate(CustomerVO customerVO, LoginInfo loginInfo) throws InvocationTargetException, IllegalAccessException, Exception;

   void removeById(String id);

   PageInfo<CustomerVO> findPageByVO(CustomerVO customerVO, Integer pageNum, Integer pageSize, LoginInfo loginInfo) throws InvocationTargetException, IllegalAccessException;

   CustomerVO load(String customerNo ,String partnerCode, LoginInfo loginInfo);

   void removeByListVo(List<CustomerVO> customerVOList) throws IllegalAccessException, InvocationTargetException, InstantiationException;

   List<CustomerVO> allList(CustomerVO customerVO, LoginInfo loginInfo) throws Exception;

   /**
    * 今日新增客户
    *
    * @param customerVO
    * @param loginInfo
    * @return
    * @throws Exception
    */
   List<CustomerVO> todayCustomerList(CustomerVO customerVO, LoginInfo loginInfo) throws Exception;

   List listByVo(CustomerVO v , LoginInfo loginInfo);

   CustomerVO getByPhone(String customerMobile , String partnerCode);

   void saveOrUpdate(CustomerVO v1);

   CustomerVO queryCustomerByCustomerNo(String customerNo,String partnerCode);

   void updateOrSave(CustomerVO customerVO);

   void updateByCustomerNo(CustomerVO customerVO);

   PageInfo<CustomerVO> pageByOem(CustomerVO customerVO, Integer pageNum, Integer pageSize, LoginInfo loginInfo);
}
